<me:UIGLLG x:Class="WPFExcelReport.TGB14RED"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:WH="clr-namespace:WPFExcelReport;assembly=TLAGPL"
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    x:Name="TV"
                    Background="White"  
                    Loaded="Window_Loaded"
     >
    <me:UIGLLG.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:TIMES100  x:Key="X100"/>
        <ucd:TIMES10  x:Key="X10"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:TRIMGB2312Convert8859P1 x:Key="tgb"/>
    </me:UIGLLG.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
            <RowDefinition Height="AUTO"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Grid.Column="0">
            <WrapPanel>

                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=库:}}"></TextBlock>
                <ex:TXT72   CharacterCasing="Upper"   Text="{Binding LO,ElementName=TV}" Width="40"    />
                <TextBlock   Grid.Column="2" Text="{Binding Source={Localization:Translate Word=区:}}"></TextBlock>
                <ex:TXT72 CharacterCasing="Upper"   Text="{Binding LB,ElementName=TV}" Width="40" MaxLength="2" />
                <TextBlock   Grid.Column="4" Text="{Binding Source={Localization:Translate Word=位:}}"></TextBlock>
                <ex:TXT72 KeyUp="QUERY_KeyUp"   CharacterCasing="Upper"   Text="{Binding LP,ElementName=TV}" Width="40"  MaxLength="8"/>
                <TextBlock   Grid.Column="6" Text="{Binding Source={Localization:Translate Word=染批:}}"></TextBlock>
                <ex:TXT72 KeyUp="QUERY_KeyUp"   CharacterCasing="Upper"   Text="{Binding ART,ElementName=TV}" Width="140" />
                <Label Content="{Binding Source={Localization:Translate Word=下单时间从}}" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top"/>
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0" 
                            Text="{Binding FROMDATE,ElementName=TV}"   Width="126" SelectedDateChanged ="FROM_DATE_SelectedDateChanged" SelectedDateFormat="Short"  />
                <Label Content="{Binding Source={Localization:Translate Word=到}}" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top"/>
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0"   
                            Text="{Binding ENDDATE,ElementName=TV}"   Width="126" SelectedDateChanged ="END_DATE_SelectedDateChanged" />
                <Button   Click="QueryCommand" Height="30" Margin="5,0,0,0" Width="30" ToolTip="{Binding Source={Localization:Translate Word=查询}}" >
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/Search.png" />
                    </Button.Background>
                </Button>
            </WrapPanel >
        </StackPanel>
        <DataGrid  Grid.Row="1" Grid.Column="0"  
                   VerticalAlignment="Top"  
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto" 
                   HeadersVisibility="Column"           
                   IsReadOnly="True"
                   ItemsSource="{Binding Source={StaticResource vwMaster}}"  
                   IsSynchronizedWithCurrentItem="True" Name="dlgMaster" 
                >
            <DataGrid.Columns>
                <!--<DataGridTextColumn Binding="{Binding Path=KDKUNDNA, Converter={StaticResource ResourceKey=gb2312}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=客户}}"  Width="Auto" />-->
                <DataGridTextColumn Binding="{Binding Path=GABWERTDAT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=日期}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GABBUCHZEIT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=时间}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GABART, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=品种}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GABFARBE, Converter={StaticResource ResourceKey=gb2312}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=颜色}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GPSPPART, Converter={StaticResource ResourceKey=gb2312}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=染批}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GABKG, Converter={StaticResource ResourceKey=d1000}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=数量}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GABBS, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=操作代号}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABC, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=操作记录}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GABLO, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=库}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GABLB, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=区}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GABLP, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=位}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GABBUCHBEN, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=操作人员}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GABFC, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"  IsReadOnly="True" Header="{Binding Source={Localization:Translate Word=操作界面}}"  Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</me:UIGLLG>
